<template>
  <div>
    <div class="father">我是父组件啊</div>
    <br />
    <br />
    <hr />
    <son :myname="myname" @msgEvent="getval"></son>
  </div>
</template>

<script>
import son from './son'
export default {
  components: {
    son
  },
  data () {
    return {
      myname: '廖睿'
    }
  },
  methods: {
    getval (val) {
      console.log('这是子组件的内容' + val + val[2].name)
    }
  }
}
</script>

<style>
.father {
  width: 400px;
  height: 400px;
  border: 1px solid #000;
}
</style>
